package com.share.order.api;

import com.share.order.bean.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * author:caifan
 * date:2019/4/27
 */
@FeignClient(name = "order")
@RequestMapping(value = "/rest/order")
public interface OrderApi {

    @GetMapping("/byUserId")
    Order getOrderByUserId(@RequestParam("userId")Long userId);

    @GetMapping("/birth")
    Order getBirth(@RequestParam("birth") Date birth);
}
